import request from '@/utils/request'

// 删除漫画
export function previewComic(id) {
  return request({
    url: '/entity/comic/' + id,
    method: 'delete'
  })
}

// 下载漫画
export function downloadComic(id) {
  return request({
    url: '/entity/comic/' + id,
    method: 'get'
  })
}

// 查询漫画列表
export function listComic(query) {
  return request({
    url: '/entity/comic/list',
    method: 'get',
    params: query
  })
}

// 查询漫画详细
export function getComic(id) {
  return request({
    url: '/entity/comic/' + id,
    method: 'get'
  })
}

// 新增漫画
export function addComic(data) {
  return request({
    url: '/entity/comic',
    method: 'post',
    data: data
  })
}

// 修改漫画
export function updateComic(data) {
  return request({
    url: '/entity/comic',
    method: 'put',
    data: data
  })
}

// 删除漫画
export function delComic(id) {
  return request({
    url: '/entity/comic/' + id,
    method: 'delete'
  })
}

// 导出漫画
export function exportComic(query) {
  return request({
    url: '/entity/comic/export',
    method: 'get',
    params: query
  })
}
